package 工厂;

import java.util.HashMap;
import java.util.Map;

public class Factory {

    {
        map.put("支付宝", new ZhifubaoProduct());
        map.put("微信", new WechatProduct());
    }

    public static Map<String, Product> map = new HashMap<>();



    public Product produce(String type) {
        return map.get(type);
    }

}
